class Grid
  include Mongoid::Document
  include Mongoid::Timestamps

  field :code, type: String
  field :name, type: String
  field :memo, type: String

  has_many :machine_grids

  validates :code, :name, :memo, presence: true
  validates :code, uniqueness: true
end
